
<!--
*Author：富行天下团队
 *
 *代码由框架生成,任何更改都可能导致被代码生成器覆盖
 *业务请在@/extension/mall/Mall_volume.js此处编写
 -->
<template>
    <div>
        <view-grid
                   ref="grid"
                   :columns="columns"
                   :detail="detail"
                   :editFormFields="editFormFields"
                   :editFormFileds="editFormFields"
                   :editFormOptions="editFormOptions"
                   :searchFormFields="searchFormFields"
                   :searchFormFileds="searchFormFields"
                   :searchFormOptions="searchFormOptions"
                   :table="table"
                   :extend="extend">
        </view-grid>
    </div>
</template>

<script>
    import extend from "@/extension/mall/Mall_volume.js";
    import ViewGrid from "@/components/basic/ViewGrid.vue";
    var vueParam = {
        components: {
            ViewGrid
        },
        data() {
            return {
                table: {
                    key: 'id',
                    footer: "Foots",
                    cnName: '优惠券',
                    name: 'Mall_volume',
                    url: "/Volumes/",
                    sortName: "createDate"
                },
                extend: extend,
                editFormFields: {"volumeCode":"","volumeDescription":"","volumeType":"","ticketPrice":"","effectiveStartDate":"","effectiveEndDate":"","cost":"","quantity":"","IsUnlimitedQuantity":"","isAvailable":"","modifier":"","modifyID":"","modifyDate":"","createDate":"","createID":"","creator":"","isSupportoffline":"","offlineCode":"","isSupportonline":"","onlineCode":""},
                editFormOptions: [
                         [{"title":"券描述","required":true,"field":"volumeDescription","type":"text"},
                         {"title":"券编码","field":"volumeCode","type":"text"},],
                         [{"title":"券类型","required":true,"field":"volumeType","type":"select","dataKey": "VolumeType"},
                         {"title":"票面价","required":true,"field":"ticketPrice","type":"text"}],
                         [{"title":"开始时间","required":true,"field":"effectiveStartDate","type":"date"},
                         {"title":"结束时间","required":true,"field":"effectiveEndDate","type":"date"}], 
                         [{"title":"成本","required":true,"field":"cost","type":"text"},
                         {"title":"库存数量","required":true,"field":"quantity","type":"text"}],
                         [{"title":"是否无限库存","field":"isUnlimitedQuantity","type":"switch"}, 
                         {"title":"是否可用","required":true,"field":"isAvailable","type":"switch"}],
                         //[{"title":"是否删除","required":true,"field":"isDelete","type":"switch"}]    
                         [{"title":"是否线下可用","field":"isSupportoffline","type":"switch"},
                         {"title":"线下编码","field":"offlineCode","type":"selectList","dataKey":"offlineCode_type",colSize: 6},],
                         //{"title":"辅助标签","field":"auxiliaryLabel","type":"selectList","dataKey":"Label",colSize: 6},],
                         [{"title":"是否线上可用","field":"isSupportonline","type":"switch",},                
                         {"title":"线上编码","field":"onlineCode","type":"selectList","dataKey":"onlineCode_type",colSize:6},],
                         [ {"title":"是否可领取","field":"isTake","type":"switch",},]
                        
                ],
                searchFormFields: {"volumeCode":"","volumeDescription":"","volumeType":"","isAvailable":"","creator":"","effectiveStartDate":"","effectiveEndDate":""},
                searchFormOptions: [[{"title":"券描述","field":"volumeDescription","type":"like"},{"title":"券类型","field":"volumeType","type":"select","dataKey": "VolumeType"},],
                [{"title":"是否可用","field":"isAvailable","type":"select","dataKey":"enable"},{field:'effectiveStartDate',title:'开始有效时间',type:'datetime',width:110,align:'left',sortable:true},],
                         ],
                columns: [
                       //{field:'volumeCode',title:'券编码',type:'string',width:220,align:'left'},
                       {field:'volumeDescription',title:'券描述',type:'string',width:180,align:'left'},
                       {field:'volumeType',title:'券类型',bind: { key: 'VolumeType', data: [] },type:'string',width:180,align:'left'},
                        {field:'isTake',title:'是否可领用',bind: { key: 'enable', data: [] },type:'sbyte',width:120,align:'left'},
                       {field:'ticketPrice',title:'票面价',type:'decimal',width:90,align:'left'},
                       {field:'cost',title:'成本',type:'decimal',width:90,align:'left',sortable:true},
                       {field:'isUnlimitedQuantity',title:'是否无限库存',bind: { key: 'enable', data: [] },type:'sbyte',width:180,align:'left' },
                       {field:'quantity',title:'库存数量',type:'int',width:90,align:'left'},
                       {field:'isSupportoffline',title:'是否线下可用',bind: { key: 'enable', data: [] },type:'sbyte',width:120,align:'left'},
                       {field:'offlineCode',title:'线下编码',bind: { key: 'offlineCode_type', data: [] },type:'string',width:120,align:'left'},
                       {field:'isSupportonline',title:'是否线上可用',bind: { key: 'enable', data: [] },type:'sbyte',width:120,align:'left'},
                       {field:'onlineCode',title:'线上编码',bind: { key: 'onlineCode_type', data: [] },type:'string',width:120,align:'left'},
                       {field:'effectiveStartDate',title:'有效开始时间',type:'date',width:135,align:'left',sortable:true},
                       {field:'effectiveEndDate',title:'有效结束时间',type:'date',width:135,align:'left',sortable:true},
                       {field:'isAvailable',title:'是否可用',bind: { key: 'enable', data: [] },type:'sbyte',width:90,align:'left'},
                       
                      // {field:'isDelete',title:'是否删除',bind: { key: 'enable', data: [] },type:'int',width:90,require:true,align:'left'},
                       {field:'createDate',title:'创建时间',type:'datetime',width:160,align:'left',sortable:true},
                   //    {field:'createID',title:'创建人ID',type:'int',width:90,hidden:true,align:'left'},
                       {field:'creator',title:'创建人',type:'string',width:120,align:'left'},
                      // {field:'id',title:'主键',type:'int',width:90,hidden:true,readonly:true,require:true,align:'left'},
                       {field:'modifier',title:'修改人',type:'string',width:120,align:'left'},
                       {field:'modifyDate',title:'修改时间',type:'datetime',width:160,align:'left',sortable:true},
                        {field:'volumnStatus',title:"状态",bind: { key: 'volumnstatus', data: [] },type:"string",width:120,align:'left',hidden:true},
                        {field:'random',title:"是否随机生成券",type:"sbyte",width:160,align:'left'}
                    
                     //  {field:'modifyID',title:'修改人ID',type:'int',width:90,hidden:true,align:'left'},
                    //    {field:'spare1',title:'扩展字段1',type:'string',width:220,align:'left'},
                    //    {field:'spare10',title:'扩展字段1',type:'string',width:220,align:'left'},
                    //    {field:'spare11',title:'扩展字段1',type:'string',width:220,align:'left'},
                    //    {field:'spare12',title:'扩展字段1',type:'string',width:220,align:'left'},
                    //    {field:'spare2',title:'扩展字段1',type:'string',width:220,align:'left'},
                    //    {field:'spare3',title:'扩展字段1',type:'string',width:220,align:'left'},
                    //    {field:'spare4',title:'扩展字段1',type:'string',width:220,align:'left'},
                    //    {field:'spare5',title:'扩展字段1',type:'string',width:220,align:'left'},
                    //    {field:'spare6',title:'扩展字段1',type:'string',width:220,align:'left'},
                    //    {field:'spare7',title:'扩展字段1',type:'string',width:220,align:'left'},
                    //    {field:'spare8',title:'扩展字段1',type:'string',width:220,align:'left'},
                    //    {field:'spare9',title:'扩展字段1',type:'string',width:220,align:'left'},
                      ],
                detail: {
                    cnName:"#detailCnName",
                    columns: [],
                    sortName: "",
                    key:""
                }
            };
        }
    };
    export default vueParam;
</script>


